<template>
  <div class="payment-fail">
    <div class="fail-container">
      <div class="fail-icon">
        <i class="el-icon-error"></i>
      </div>
      <h2>支付失败</h2>
      <p class="error-message">抱歉，支付验证失败，请稍后重试</p>
      <div class="action-buttons">
        <el-button type="primary" @click="retryPayment">重新支付</el-button>
        <el-button @click="goToHome">返回首页</el-button>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "PaymentFail",
  methods: {
    retryPayment() {
      // 返回订单页面重新支付
      this.$router.push("/order");
    },
    goToHome() {
      this.$router.push("/");
    },
  },
};
</script>

<style scoped>
.payment-fail {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: #f5f5f5;
}

.fail-container {
  background: white;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  text-align: center;
}

.fail-icon {
  font-size: 48px;
  color: #f56c6c;
  margin-bottom: 20px;
}

.error-message {
  color: #666;
  margin: 20px 0;
}

.action-buttons {
  margin-top: 30px;
}

.action-buttons .el-button {
  margin: 0 10px;
}
</style>